//============================================================================
//	警告: 这个文件是使用2009-8-28 17:56:54建立的IBatisNetGen.DaoImpl.cst生成的.
//				重新生成时,原先手动做的修改将会丢失.
//============================================================================
using System;
using System.Collections.Generic;
using System.Text;
using IBatisNet.DataMapper;
using Bino.ExamOnline.Components.Entitys;
using Bino.ExamOnline.Components.Interface;
using CMail.Common.TextLib;

namespace Bino.ExamOnline.DataProvider 
{	
    /// <summary>实现<see cref="ISubjectDao"/>接口.</summary>
    public class SubjectDataProvider : ISubjectDao 
	{
		/// <summary>实现 <see cref="ISubjectDao.GetSubjectsCount"/></summary>
		public int GetSubjectsCount() {
			string statementId = "Subject.GetSubjectsCount";
			int result = ExecuteQueryForObject<int>(statementId, null);
			return result;
		}

		/// <summary>实现 <see cref="ISubjectDao.GetSubject"/></summary>
		public Subject GetSubject(Int32 iD) 
		{
			string statementId = "Subject.GetSubject";
			Subject result = ExecuteQueryForObject<Subject>(statementId, iD);
			return result;
		}


		/// <summary>实现 <see cref="ISubjectDao.GetAllSubjects"/></summary>
		public IList<Subject> GetAllSubjects() 
		{
			string statementId = "Subject.GetAllSubjects";
			IList<Subject> results = ExecuteQueryForList<Subject>(statementId, null);
			return results;
		}

		/// <summary>实现 <see cref="ISubjectDao.GetAllSubjectsWithOutLob"/></summary>
		public IList<Subject> GetAllSubjectsWithOutLob()
		{
			string statementId = "Subject.GetAllSubjectsWithOutLob";
			IList<Subject> results = ExecuteQueryForList<Subject>(statementId, null);
			return results;
		}
	
		/// <summary>实现 <see cref="ISubjectDao.CreateSubject"/></summary>
		public void CreateSubject(Subject obj)
		{
			if (obj == null) 
				return;
			string statementId = "Subject.CreateSubject";
			ExecuteInsert(statementId, obj);
		}

		/// <summary>实现 <see cref="ISubjectDao.UpdateSubject"/></summary>
		public void UpdateSubject(Subject obj) 
		{
			if (obj == null) 
				return;
			string statementId = "Subject.UpdateSubject";
			ExecuteUpdate(statementId, obj);
		}

		/// <summary>实现 <see cref="ISubjectDao.DeleteSubject"/></summary>
		public void DeleteSubject(Subject obj) 
		{
			if (obj == null)
				return;
			string statementId = "Subject.DeleteSubject";
			ExecuteDelete(statementId, obj);
		}

		/// <summary>实现 <see cref="ISubjectDao.DeleteSubjectByID"/></summary>
		public int DeleteSubjectByID(Int32 iD) 
		{
			string statementId = "Subject.DeleteSubjectByID";
			int result = ExecuteDelete(statementId, iD);
			return result;
		}		

		/// <summary>实现 <see cref="ISubjectDao.ReloadSubject"/></summary>
		public void ReloadSubject(Subject obj) 
		{
			if (obj == null) 
				return;
			string statementId = "Subject.GetSubject";
			ExecuteQueryForObject<Subject>(statementId, obj, obj);
		}		

	}
}
